package com.shopnight.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shopnight.entity.Image;
import com.shopnight.service.IImageService;
import com.shopnight.mapper.ImageMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 13201
* @description 针对表【shop_image】的数据库操作Service实现
* @createDate 2022-09-09 20:19:50
*/
@Service
public class ImageServiceImpl extends ServiceImpl<ImageMapper, Image>
    implements IImageService {

    @Override
    public Image selectImagesOne(Long orderId) {
        List<Image> images = this.baseMapper.selectList(new LambdaQueryWrapper<Image>().eq(Image::getOrderId, orderId));
        return images.get(0);
    }
}




